﻿''' <summary>
''' 探空数据数组类 
''' </summary>
''' <remarks></remarks>
<Serializable()> Public Class ReconnaissanceDataConcourse
    Implements ICloneable

    ''' <summary>
    ''' 探空数据类数组 (ReconnaissanceData)
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ArrReconnaissance(-1) As ReconnaissanceData
    ''' <summary>
    ''' 气象数据的个数 (Integer)
    ''' </summary>
    ''' <remarks></remarks>
    Private m_countWeather As Integer
    ''' <summary>
    ''' 总行数 (Integer)
    ''' </summary>
    ''' <remarks></remarks>
    Private m_sumCountTier As Integer

    ''' <summary>
    ''' 时间类的数组 (ReconnTime)
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ArrReconnTime(-1) As ReconnTime
    ''' <summary>
    ''' 年的数组
    ''' </summary>

    Property SumCountTier() As Integer
        Get
            Return Me.m_sumCountTier
        End Get
        Set(ByVal value As Integer)
            Me.m_sumCountTier = value
        End Set
    End Property
    ''' <summary>
    ''' 气象数据的个数 (Integer)
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property CountWeather() As Integer
        Get
            Return Me.m_countWeather
        End Get
        Set(ByVal value As Integer)
            Me.m_countWeather = value
        End Set
    End Property
    ''' <summary>
    ''' 探空数据类数组 (ReconnaissanceData)
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArrReconnaissance() As ReconnaissanceData()
        Get
            Return Me.m_ArrReconnaissance
        End Get
        Set(ByVal value As ReconnaissanceData())
            Me.m_ArrReconnaissance = value
        End Set
    End Property
    ''' <summary>
    ''' 时间类的数组 (ReconnTime)
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArrReconnTime() As ReconnTime()
        Get
            Return Me.m_ArrReconnTime
        End Get
        Set(ByVal value As ReconnTime())
            Me.m_ArrReconnTime = value
        End Set
    End Property
    Public Function GetStartTime() As DateTime
        If Me.m_ArrReconnaissance.Length > 0 Then
            Return New Date(Me.m_ArrReconnaissance(0).Year, Me.m_ArrReconnaissance(0).Month, Me.m_ArrReconnaissance(0).Day)
        Else
            Return Nothing
        End If
    End Function

    Public Function GetEndTime() As DateTime
        If Me.m_ArrReconnaissance.Length > 0 Then
            Return New Date(Me.m_ArrReconnaissance(m_ArrReconnaissance.Length - 1).Year, Me.m_ArrReconnaissance(m_ArrReconnaissance.Length - 1).Month, Me.m_ArrReconnaissance(m_ArrReconnaissance.Length - 1).Day)
        Else
            Return Nothing
        End If
    End Function

    Public Function Clone() As Object Implements System.ICloneable.Clone
        Dim objCopy As New ReconnaissanceDataConcourse
        ReDim objCopy.m_ArrReconnaissance(Me.m_ArrReconnaissance.Length - 1)
        For i As Integer = 0 To Me.m_ArrReconnaissance.Length - 1
            objCopy.m_ArrReconnaissance(i) = Me.m_ArrReconnaissance(i).Clone
        Next
        objCopy.m_countWeather = Me.m_countWeather
        objCopy.m_sumCountTier = Me.m_sumCountTier
        ReDim objCopy.m_ArrReconnTime(Me.m_ArrReconnTime.Length - 1)
        For i As Integer = 0 To Me.m_ArrReconnTime.Length - 1
            objCopy.m_ArrReconnTime(i) = Me.m_ArrReconnTime(i).Clone
        Next
        Return objCopy
    End Function
End Class
